package com.bridgeintelligent.tag.webserver.security;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

@Getter
@Setter
@Accessors(chain = true)
public class SessionTagPerms implements Serializable {

    // 用户ID
    private String userId;
    // 公共标签权限
    private boolean publik;
    // 个人标签权限 
    private List<String> personalDepts = new ArrayList<>();
    // 部门标签权限
    private List<String> depts = new ArrayList<>();

    public void addPersonalDept(String deptId) {
        this.personalDepts.add(deptId);
    }

    public void addDept(String deptId) {
        this.depts.add(deptId);
    }

}
